﻿
using HttpApiGateway.Interface;
using HttpApiGateway.Model;

namespace HttpApiGateway.Response
{
        public class HtmlResponse : IResponse
        {
                private readonly string _Html = null;
                public HtmlResponse(string html)
                {
                        this._Html = html;
                }

                public ResponseType ResponseType => ResponseType.Html;

                public virtual void InitResponse(IApiService service)
                {
                        service.Response.ContentType = "text/html";
                }

                public bool Verification(IApiService service)
                {
                        return true;
                }

                public virtual void WriteStream(IApiService service)
                {
                        service.Response.Write(this._Html);
                }
        }
}
